﻿using System.ComponentModel;
using System.Web.Services;
using TripLOA.WebService.Serializable;

namespace TripLOA.WebService.Soap
{
    /// <summary>
    /// Summary description for georef
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class SoapGeoRef : System.Web.Services.WebService
    {
        private GeoRefCore core;

        #region SoapGeoRef Constructors

        public SoapGeoRef()
        {
            core = GeoRefCore.Istance();
        }

        #endregion

        #region SoapGeoRef methods

        [WebMethod(EnableSession=true)]
        public WSGeoLoc geoCoding(string state, string city, string zipCode, string road)
        {
            return core.geoCoding(state, city, road);
        }

        [WebMethod(EnableSession=true)]
        public WSGeoLoc reverseGeoCoding(double lat,double lng)
        {
            return core.reverseGeoCoding(lat,lng);
        }

        // NON PRENDE PARAMETRI e' un TESTWS ?
        [WebMethod(EnableSession=true)]
        public WSGeoTrip getGeoTrip()
        {
            return core.getGeoTrip();
        }

        #endregion
    }
}
